package com.hwy.catering.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 *
 * @TableName tb_category
 */
@Data
@TableName("tb_category")
public class Category extends BaseEntity implements Serializable {
    
    @TableId(type = IdType.ASSIGN_ID)
    //雪花算法生成id，传给前端精度丢失，加上这个
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 类型 1、菜品分类 2、套餐分类
     */
    private Integer type;

    /**
     * 分类名称
     */
    private String name;

    /**
     * 排列顺序
     */
    private Integer sort;


    private static final long serialVersionUID = 1L;
}
